package com.zj.controller;

import com.zj.config.AppConfig;
import com.zj.service.impl.IndexService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class TestMain {
	public static void main(String[] args) {
//		AnnotationConfigApplicationContext context0=new AnnotationConfigApplicationContext(AppConfig.class);
//
//		AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext();
//		context.register(AppConfig.class);
//		context.refresh();
//		IndexService bean = context.getBean(IndexService.class);
//		System.out.println(bean);

		ClassPathXmlApplicationContext xmlApplicationContext = new ClassPathXmlApplicationContext("spring-a.xml");
		System.out.println(xmlApplicationContext.getBeanDefinitionNames());
	}


}
